#include <asm/asm.h>
#include <asm/regdef.h>
#include <cpu.h>
#include <asm/context.h>
#include <inst_ex_test.h>

####LEAF(n60_sub_ex_test)
    .globl n60_sub_ex_test
n60_sub_ex_test:
    .set noreorder
    li  a0, 0x3C
###test inst
    TEST_SUB_EX(0x9f767750, 0x70410c7a, 0x8ddc20c0, 0x9f767750)
    TEST_SUB_EX(0x1625bcc8, 0xb53cd464, 0x421d020a, 0x1625bcc8)
    TEST_SUB_EX(0xb226ec94, 0xb196dd00, 0x7dfd9ab0, 0xb226ec94)
    TEST_SUB_EX(0xdc373c00, 0x21ccbee8, 0x9a01fac4, 0xdc373c00)
    TEST_SUB_EX(0xf4e01aa8, 0x734a367f, 0xe17354f8, 0xf4e01aa8)
    TEST_SUB_EX(0x8754eb0d, 0x6f8c1169, 0x9eddbba4, 0x8754eb0d)
    TEST_SUB_EX(0x3f0637b6, 0x63d3fd1e, 0xd0378bea, 0x3f0637b6)
    TEST_SUB_EX(0xb72e3dc0, 0xb467a2f0, 0x43a582b0, 0xb72e3dc0)
    TEST_SUB_EX(0xb4cca190, 0xa7c97e00, 0x73ce3080, 0xb4cca190)
    TEST_SUB_EX(0x11f4fab1, 0x5bb44744, 0xc4569c6c, 0x11f4fab1)
    TEST_SUB_EX(0xa1d47024, 0x4c7be9bb, 0x980db6ec, 0xa1d47024)
    TEST_SUB_EX(0xee3b8b21, 0x79450eb0, 0xd3a634f7, 0xee3b8b21)
    TEST_SUB_EX(0xb09f8deb, 0x511a4824, 0xc3ae4398, 0xb09f8deb)
    TEST_SUB_EX(0x2e700561, 0x5f9d1f40, 0xcf02b6fe, 0x2e700561)
    TEST_SUB_EX(0x6f94c2c0, 0xc6dfef00, 0x73d11600, 0x6f94c2c0)
    TEST_SUB_EX(0x23f81921, 0x4b546b70, 0x97419254, 0x23f81921)
    TEST_SUB_EX(0xedd15164, 0x65eaa24c, 0xe51c2960, 0xedd15164)
    TEST_SUB_EX(0x8e970ca6, 0x17f073d4, 0x96249d08, 0x8e970ca6)
    TEST_SUB_EX(0xe4305840, 0x71119e61, 0x902a41a0, 0xe4305840)
    TEST_SUB_EX(0x2b1bb290, 0x9bdcba50, 0x73610be2, 0x2b1bb290)
    TEST_SUB_EX(0x8fa1e167, 0x4364d130, 0xa1395784, 0x8fa1e167)
    TEST_SUB_EX(0xc1eea22e, 0x555591ba, 0xc6b80060, 0xc1eea22e)
    TEST_SUB_EX(0x5086d0c5, 0x9c695098, 0x633e7b0e, 0x5086d0c5)
    TEST_SUB_EX(0xc8c5ad7a, 0x8b1afee8, 0x671bed54, 0xc8c5ad7a)
    TEST_SUB_EX(0xde30e340, 0xc76ce200, 0x4d98be80, 0xde30e340)
    TEST_SUB_EX(0xba9fa020, 0x3e9fb3b0, 0x8fbebffc, 0xba9fa020)
    TEST_SUB_EX(0xf6774e04, 0xb0b68290, 0x424dcfec, 0xf6774e04)
    TEST_SUB_EX(0x82ec757d, 0x0a0dc120, 0x872780e0, 0x82ec757d)
    TEST_SUB_EX(0xd9449ddc, 0x7f158f40, 0xd649ef60, 0xd9449ddc)
    TEST_SUB_EX(0x2b70d50c, 0xadc99f50, 0x58c30364, 0x2b70d50c)
    TEST_SUB_EX(0x7e41bd78, 0x9b6a6fec, 0x5a9e9548, 0x7e41bd78)
    TEST_SUB_EX(0x73aca300, 0x42691971, 0xa72508a0, 0x73aca300)
    TEST_SUB_EX(0x521a0a7e, 0x6796563f, 0xb6fe304d, 0x521a0a7e)
    TEST_SUB_EX(0xaa0667b0, 0x77243fcf, 0xbea8215a, 0xaa0667b0)
    TEST_SUB_EX(0x356ca2f4, 0x6b3069ae, 0xdd122730, 0x356ca2f4)
    TEST_SUB_EX(0x7b3f2760, 0xab29890a, 0x57e6120c, 0x7b3f2760)
    TEST_SUB_EX(0x89cff440, 0x8e78bd3e, 0x696bedc0, 0x89cff440)
    TEST_SUB_EX(0x685ffa38, 0x8f92dcce, 0x153362d0, 0x685ffa38)
    TEST_SUB_EX(0x592d2820, 0xd56cf700, 0x7997dad0, 0x592d2820)
    TEST_SUB_EX(0x4c8defdc, 0x8f55ca75, 0x27bb42b4, 0x4c8defdc)
    TEST_SUB_EX(0xcf0b6f54, 0x8f139208, 0x453d7a36, 0xcf0b6f54)
    TEST_SUB_EX(0xa0d69a38, 0x2ff1a3be, 0x8ae324c0, 0xa0d69a38)
    TEST_SUB_EX(0xda3759c0, 0x8ae2d280, 0x3f110408, 0xda3759c0)
    TEST_SUB_EX(0x857e42ce, 0x7720685e, 0x8f4affe5, 0x857e42ce)
    TEST_SUB_EX(0x3d450948, 0x9981eb30, 0x6d2813e0, 0x3d450948)
    TEST_SUB_EX(0xdb52b260, 0x80ef0c00, 0x6518a02c, 0xdb52b260)
    TEST_SUB_EX(0x4430d2af, 0x7bed2cdf, 0xb5be3b98, 0x4430d2af)
    TEST_SUB_EX(0x07182605, 0xa85e7d00, 0x6b7e8e36, 0x07182605)

###detect exception
###score ++
    addiu s3, s3, 1
###output a0|s3
inst_error:  
    sw s3, 0($23)
    sw a0, 0(s1)
    jr ra
    nop
####END(n60_sub_ex_test)
